package com.study.pojo.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Integer id;
    @Pattern(regexp = "^[\u4e00-\u9fa5]{1,3}$", message = "昵称限制在1-3位中文字符！")
    private String username;
    @Pattern(regexp = "^\\d{3,6}$", message = "密码限制在3-6为数字！")
    private String password;
    private String name;
    private String code;
    private Integer loveId;
}
